<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:84:"D:\phpStudy\WWW\qybaowap\public/../application/index\view\capital\editphone.html";i:1513933606;}*/ ?>
<!DOCTYPE html>
<html lang="en" >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <script src="__STATIC__/js/base.js"></script>
    <title>找回支付密码</title>
    <link rel="stylesheet" href="__STATIC__/css/base.css">
    <link rel="stylesheet" href="__STATIC__/css/modify.css">
    <link rel="stylesheet" href="__STATIC__/js/layer_mobile/need/layer.css">
    <script src="__STATIC__/js/jquery-1.11.1.min.js"></script>
    <script src="__STATIC__/js/form_validation.js"></script>
    <script src="__STATIC__/js/layer_mobile/layer.js"></script>
</head>
<body>
<section class="wrap">
    <div></div>
    <div id="login-form">
        <div id="form-title" >短信验证,以确保本人操作</div>
            <form action="#"  class="bg-white"  id="form1">
            <div class="form-content " >
                <div class="clearfix input-inline"  >
                    <div class="formtitle pull-left">手机号</div>
                    <div class="formcontent pull-left">
                        <input tabindex="1"     id="phone_number"   class="inputstyle1" autocomplete="off"  maxlength="15" type="text" name="username" placeholder="请输入手机号"/>
                    </div>
                </div>
            </div>
            <div class="form-content "  >
                <div class="clearfix input-inline " style="position: relative">
                    <div class="formtitle pull-left">验证码</div>
                    <div class="formcontent pull-left">
                        <input tabindex="1" id="code"  class="inputstyle1" style="width:9rem " autocomplete="off"  maxlength="15" type="text" name="username" placeholder="请输入验证码"/>
                    </div>
                    <input type="button" class="getCapche"  value="发送验证码" id="verification_code" onclick="sendCapche()"  >
                </div>
            </div>
            <div class="login-orther clearfix" style="margin-top: 0">
                <div class="pull-right"><a href="/emailvalidate.html" >收不到验证码？</a></div>
            </div>
            <input type="button" class="login-button" value="验证" id="sublimit">
        </form>
    </div>
</section>
<script>
    function sendCapche(){
        var phone = $('#phone_number').val();
        if(phone ==''){
            layer.open({
                content:'请先填写手机号'
                ,skin: 'msg'
                ,time:3 //2秒后自动关闭
            });
            return false;
        }
        var formData = {sms_code:"SMS_79040038",phone:phone};
//        $.ajax({
//            url : "checkMobile",
//            type: "POST",
//            data : formData,
//            success: function(data)
//            {
//                //data - response from server
//                if(data.code != 'OK'){
//                    layer.open({
//                        content:data.msg
//                        ,skin: 'msg'
//                        ,time:3 //2秒后自动关闭
//                    });
//                }else {
//                    layer.open({
//                        content:'发送成功'
//                        ,skin: 'msg'
//                        ,time:3 //2秒后自动关闭
//                    });
//                }
//            },
//            error: function (jqXHR)
//            {
//                layer.open({
//                    content:'发送失败'
//                    ,skin: 'msg'
//                    ,time:3 //2秒后自动关闭
//                });
//            }
//        });
        var obj = $("#verification_code");
        settime(obj);
    }
    $(function(){
        //发送短信
        $('#sublimit').on('click',function(){
            var  res = searchSub();
            if(res =='ok'){
               //提交
                window.location.href='/setPayPwd.html';
           }else{
                //信息框
                //提示
                layer.open({
                    content:res
                    ,skin: 'msg'
                    ,time:3 //2秒后自动关闭
                });
            }
        });
    });
</script>
</body>
</html>